#!/usr/bin/python
# -*- coding: UTF-8 -*-

import os
import fileutils

dir = "C:\\temp\\xiyou\\HotFixData"
suffix = ".zjkj"

def __walk__(file):
    #print (file)
    dirname = os.path.dirname(file)
    filename = os.path.basename(file)
    filename = filename.replace(suffix, "")
    fullname = os.path.join(dirname, filename)
    print (fullname)
    if not os.path.isdir(fullname):
        os.makedirs(fullname)

fileutils.walkfile(dir, __walk__, [suffix])